package org.adl.registry.types;

/**
 *
 * @author Jacob Marks - Joint ADL Co-Lab
 * @version 1.0
 * @license This software is licensed as open source software pursuant to the terms defined in the Joint ADL Co-Lab Open Source Software License.  Use of any part of this software constitutes acceptance of this license. The Joint ADL Co-Lab open source agreement is available at {@link http://adlregistry.adlnet.gov/source_license.html}.
 */
public class Repository
{
    public static final String REPOSITORY_NAMESPACE = "100.51";
    
    private String mRepositoryIdentifier;
    
    /**
     * Creates a new instance of Repository
     */
    public Repository(String iRepositoryIdentifier)
    {
        this.mRepositoryIdentifier = iRepositoryIdentifier;
    }
    
    public String getRepositoryIdentifier()
    {
        return this.mRepositoryIdentifier;
    }
    
    public void setRepositoryIdentifier(String iRepositoryIdentifier)
    {
        this.mRepositoryIdentifier = iRepositoryIdentifier;
    }
    
    public static String FormatRepositoryIdentifierHandle(String iHandleSuffix)
    throws NullPointerException
    {
        String handle = "";
        
        if (iHandleSuffix == null)
        {
            throw new NullPointerException("A handle suffix is required when building a repository handle.");
        }
        
        handle += Handle.FormatHandle(Repository.REPOSITORY_NAMESPACE, iHandleSuffix);
        
        return handle;
    }
}
